//
//  LoginTextFiledCell.m
//  DLTravels
//
//  Created by mac1012 on 2016/12/15.
//  Copyright © 2016年 DianlE. All rights reserved.
//

#import "LoginTextFiledCell.h"

@interface LoginTextFiledCell()

@end

@implementation LoginTextFiledCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        _textFiled = [UITextField new];
        
        
        [self.contentView addSubview:_textFiled];
        [_textFiled mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.mas_equalTo(25.0);
            make.left.mas_equalTo(50);
            make.right.mas_equalTo(-50);
        }];
        
        UILabel *underline = [UILabel new];
        [self.contentView addSubview:underline];
        [underline setBackgroundColor:[UIColor blackColor]];
        [underline mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.mas_equalTo(0.5);
            make.bottom.equalTo(_textFiled).offset(1);
            make.left.mas_equalTo(50);
            make.right.mas_equalTo(-50);
        }];
        
        
    }
    return self;
}

- (void)setPlaceholder:(NSString *)placeholderStr value:(NSString *)valueStr{

    _textFiled.text = valueStr;
    _textFiled.placeholder = placeholderStr;
    
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
